/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package controlleur;

import java.io.Serializable;
import java.util.Date;
import java.util.GregorianCalendar;
import javax.enterprise.context.SessionScoped;
import javax.faces.bean.ManagedBean;

/**
 *
 * @author mickael.palanchon
 */
@ManagedBean
@SessionScoped
public class GeneralMB implements Serializable {

    /** Creates a new instance of GeneralMB */
    public GeneralMB() {
    }

    public String toAccueil() {
        return "ToAccueil";
    }

    public String toQuestionnaireCreer() {
        return "ToQuestionnaireCreer";
    }

    public String toQuestionnaireLister() {
        return "ToQuestionnaireLister";
    }

    public String toQuestionnaireSuivre() {
        return "ToQuestionnaireSuivre";
    }

    public String toQuestionnairePasser() {
        return "ToQuestionnaireDispo";
    }

    public String toQuestionCreer() {
        return "ToQuestionCreer";
    }

    public String toAdministration() {
        return "ToAdministration";
    }

    public String toGererEspace() {
        return "ToGererEspace";
    }

    public Date getDateDuJour(){
        GregorianCalendar gc = new GregorianCalendar();
        gc.setTime(new Date());
        return gc.getTime();
    }

    public Date getDateDuJour(int h, int m, int s){
        GregorianCalendar gc = new GregorianCalendar();
        gc.setTime(new Date());
        gc.set(GregorianCalendar.HOUR, h);
        gc.set(GregorianCalendar.MINUTE, m);
        gc.set(GregorianCalendar.SECOND, s);
        return gc.getTime();
    }

    public Date getDateDuJourMin(){
        return getDateDuJour(0, 0, 0);
    }

    public Date getDateDuJourMax(){
        return getDateDuJour(23, 59, 59);
    }

}
